<%@page import="monster.comm.util.DateUtil"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<%
	String path = request.getContextPath(); 
	String now_time=DateUtil.getDate("yyyy-MM-dd");
%>


<head>
    <title>主页</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta http-equiv="imagetoolbar" content="no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="<%=path %>/comm/resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet">
    <link href="<%=path %>/comm/resources/css/axure_rp_page.css" type="text/css" rel="stylesheet">
    <link href="<%=path %>/comm/css/inFCss/axurerp_pagespecificstyles.css" type="text/css" rel="stylesheet">
<!--[if IE 6]>
    <link href="主页_files/axurerp_pagespecificstyles_ie6.css" type="text/css" rel="stylesheet">
<![endif]-->
    <script src="<%=path %>/comm/js/data/sitemap.js"></script>
    <script src="<%=path %>/comm/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="<%=path %>/comm/plug/my97datepicker/WdatePicker.js"></script>
   
   

<script type="text/javascript">
var time="<%=now_time%>";
$(function(){
	$("#u5").val(time);
	
});
function vilName(){
	var name=$("#u114").val();
	if(name==null||name==""){
		return;
	}
	name=encodeURI(name);
	$("#u113").val("");
	$("#SQUADRON_NO").val("");
	
	$.post(
		'<%=path%>/comm/jsp/vilName.jsp',
		{
		name:name
		},
		
		function(data){
			
			if(data.id==100){
				//执行选中中队
				$("#u113").val(data.SQUADRON_NO+"中队");
				$("#SQUADRON_NO").val(data.SQUADRON_NO);
			}else if(data.id==-200){
				alert("程序异常，请联系管理员!");
			}else if(data.id==101){
				
			}
		},'json'
	);
}
//前台登录 1修改密码 2进入排班
function headLogin(type){
	var name=$("#u114").val();
	var password=$("#password").val();
	var SQUADRON_NO=$("#SQUADRON_NO").val();
	var now_time=$("#u5").val();
	var banci=$("#u122").val();

	name=encodeURI(name);
	if(name==null||name==""){
		alert("必须输入机械师/分队长");
		return;
	}
	if(password==null||password==""){
		alert("必须输入登录密码");
		return;
	}
	if(SQUADRON_NO==null||SQUADRON_NO==""){
		alert("所属中队不能为空");
		return;
	}	
	if(now_time==null||now_time==""){
		alert("排班日期不能为空");
		return;
	}
	
	$.post(
		'<%=path%>/comm/jsp/loginOne.jsp',
		{
		name:name,
		password:password,
		SQUADRON_NO:SQUADRON_NO,
		now_time:now_time,
		banci:banci		
		},
		
		function(data){			
			if(data.id==100){
				//进入到选中页面
				if(type=="1"){// 修改密码
				
					showModalDialog('<%=path%>/comm/jsp/user_password_update.jsp?name='+name,
						'密码修改','dialogWidth:1000px;dialogHeight:600px;dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes;scroll:no;'); 
		
				}else{//排班
					location="/dynamicTips/orderClass.jsp?now_time="+now_time+"&squadron_no="+SQUADRON_NO
				}				
			
			}else if(data.id==-200){
				alert("程序异常，请联系管理员!");
			}else if(data.id==101){
				alert("用户名或密码不正确！")
			}
		},'json'
		)
}
//后台登录
function bankLogin(){
	var admin=$("#admin").val();
	var adminpassword=$("#adminpassword").val();

	admin=encodeURI(admin);
	if(admin==null||admin==""){
		alert("必须输入管理登录帐号");
		return;
	}
	if(adminpassword==null||adminpassword==""){
		alert("必须输入管理登录密码");
		return;
	}
	
	
	$.post(
		'<%=path%>/comm/jsp/loginTwo.jsp',
		{
		admin:admin,
		adminpassword:adminpassword
		},
		
		function(data){
			
			if(data.id==100){
				//进入到后台页面
			    location.href="<%=path %>/admin/index.jsp";
			}else if(data.id==-200){
				alert("程序异常，请联系管理员!");
			}else if(data.id==101){
				alert("用户名或密码不正确！")
			}
		},'json'
		)
}

</script>
</head>

<body>
<input type="hidden" id="SQUADRON_NO" name="SQUADRON_NO" value=""/>
<div id="main_container">
 
<div id="u0" class="u0_container"   >
<div id="u0_img" class="u0_normal detectCanvas"></div>
<div id="u1" class="u1" style="visibility:hidden;"  >
<div id="u1_rtf"></div>
</div>
</div>
<div id="u2" class="u2_container"   >
<div id="u2_img" class="u2_normal detectCanvas"></div>
<div id="u3" class="u3" style="visibility:hidden;"  >
<div id="u3_rtf"></div>
</div>
</div>
<div id="u4" class="u4"  >
<div id="u4_rtf"><p style="text-align:center;"><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">四</span><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">川航</span><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">空</span><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">成都维修部</span><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">航班</span><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">维修</span><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">排班</span><span style="font-family:华文隶书;font-size:36px;font-weight:bold;font-style:normal;text-decoration:none;color:#CC0066;">系统</span></p></div>
</div>
<INPUT id="u5" type=text value="" class="u5" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"  data-label="textfield - date"    >
 
<div id="u6" class="u6"  >
<div id="u6_rtf"><p style="text-align:left;"><span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#333333;">排班</span><span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#333333;">日期</span></p></div>
</div>
<div id="u7" class="u7_container"   data-label="button - date picker">
<div id="u7_img" class="u7_normal detectCanvas"></div>
<div id="u8" class="u8" style="visibility:hidden;"  >
<div id="u8_rtf"></div>
</div>
</div>
<DIV id="u9" style="" data-label="panel - calendar">
登录密码
<INPUT id="password" type="password" value="" class="" data-label=""   />
</DIV>
<INPUT id="admin" type=text value="admin" class="u109"     >
 
<INPUT id="adminpassword" type="password" value="" class="u110"     >
 
<INPUT id="u111" type="submit" class="u111" value="进入后台管理"   onclick="bankLogin()" />
 
<INPUT id="u112" type="submit" class="u112" value="进入排班"   onclick="headLogin('2')" >
<INPUT id="u113" type=text value=""  readonly="readonly" class="u113"  />

 
<INPUT id="u114" type=text value="" onblur="vilName()" class="u114" data-label="姓名输入进入"   />

 
<div id="u115" class="u115_container"   >
<div id="u115_img" class="u115_normal detectCanvas"></div>
<div id="u116" class="u116" style="visibility:hidden;"  >
<div id="u116_rtf"></div>
</div>
</div>
<INPUT id="u117" type="submit" class="u117" value="个人密码修改"  onclick="headLogin('1')" >
 
<div id="u118" class="u118"  >
<div id="u118_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">所属中队</span></p></div>
</div>
<div id="u119" class="u119"  >
<div id="u119_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">机械师/分队长</span></p></div>
</div>
<div id="u120" class="u120"  >
<div id="u120_rtf"><p style="text-align:left;">
<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">管理员</span></p></div>
</div>
<div id="u121" class="u121"  >
<div id="u121_rtf"><p style="text-align:left;">
	<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">密</span>
	<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">&nbsp; &nbsp; </span>
	<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">码</span></p>
</div>
</div>
<SELECT id="u122" class="u122" data-label="排班选中进入"  >
<OPTION selected value="1">白班</OPTION>
<OPTION  value="2">夜班第一天</OPTION>
<OPTION  value="3">夜班第二天</OPTION>
</SELECT>
 
<div id="u123" class="u123"  >
<div id="u123_rtf"><p style="text-align:left;">
<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">排班</span>
<span style="font-family:Arial;font-size:16px;font-weight:bold;font-style:normal;text-decoration:none;color:#000000;">班次</span></p>
</div>
</div>
</div></body>

